package service.impl;

import java.util.ArrayList;

import dao.impl.StudentDaoImpl;
import entity.Student;
import service.IStudentService;

public class StudentServiceImpl implements IStudentService{
	private StudentDaoImpl sdi = new StudentDaoImpl();

	@Override
	public boolean save(Student t) {
		return sdi.delete(t);
	}

	@Override
	public boolean delete(Student t) {
		return sdi.delete(t);
	}

	@Override
	public boolean update(Student t) {
		return sdi.delete(t);
	}

	@Override
	public Student selectById(int id) {
		return sdi.selectById(id);
	}

	@Override
	public ArrayList<Student> selectAll() {
		return sdi.selectAll();
	}

	@Override
	public ArrayList<Student> selectByName(String name) {
		return sdi.selectByName(name);
	}

	@Override
	public ArrayList<Student> selectByScore(int low, int high) {
		return sdi.selectByScore(low, high);
	}

	@Override
	public ArrayList<Student> sortByScoreDesc() {
		return sdi.sortByScoreDesc();
	}
	
}
